You make a couple of good points FF, God does not learn or by the attribution given to him as being perfect, he cannot learn.
Secondly how could you grant "godly wisdom" to a man who has many hundreds of concubines?
As a fifteen year long archaeological study of Palestine ending in 1993 found, there was no evidence for most of the events and people of the Bible. At the time of Solomon and David there were so few inhabitants in the Judean highlands that it would have been materially impossible to even make a city and temple, far less a monarchy to be reckoned with internationally. Thomas L Thomson, a leading expert in the textual and archaeological evidence for early Israelite history concludes that the first ten books of the Bible are fiction.
There is of course nothing wrong with reading fiction--- a problem arises only if you believe it to be true.
Solomon, whose description is a burlesque of a middle Eastern potentate, was -- like most Biblical figures -- a fictional character.